package com.powernode.feign;

import com.powernode.domain.User;
import com.powernode.feign.hystrix.ProdCommMemberFeignHystrix;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * 内容:
 * 作者: cy
 */
@FeignClient(value = "member-service", fallback = ProdCommMemberFeignHystrix.class)
public interface ProdCommMemberFeign {

    /**
     * 因为用户表 很多模块都需要使用
     * 我们一般在开发过程中 向上提取 放在公共模块
     *
     * @param openIds
     * @return
     */
    @GetMapping("p/user/getUsersByOpenIds")
    List<User> getUsersByOpenIds(@RequestParam List<String> openIds);

}
